
package se.sll.service.catalogue.offers.api.resource;

import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Response;
import se.sll.service.catalogue.offers.api.model.CreateOffer;
import se.sll.service.catalogue.offers.api.model.OfferUnitList;
import se.sll.service.catalogue.offers.api.model.ProductReferenceParamList;
import se.sll.service.catalogue.offers.api.model.UnitList;


/**
 * Service for managing Offers per Care Unit.
 * 
 */
@Path("units")
public interface OffersService {


    /**
     * 
     */
    @GET
    @Produces({
        "application/json"
    })
    OffersService.GetUnitsResponse getUnits()
        throws Exception
    ;

    /**
     * Create a new Offer for a specific care unit.
     * 
     * @param entity
     *      e.g. {
     *       "hsaID" : "SE2321000016-1HF3",
     *       "regionalUnitId" : "126t"
     *     }
     *     
     */
    @POST
    @Consumes("application/json")
    OffersService.PostUnitsResponse postUnits(CreateOffer entity)
        throws Exception
    ;

    /**
     * Update an Offer
     * 
     * @param entity
     *      e.g. {
     *       "hsaID" : "SE2321000016-1HF3",
     *       "regionalUnitId" : "126t"
     *     }
     *     
     */
    @PUT
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    OffersService.PutUnitsResponse putUnits(CreateOffer entity)
        throws Exception
    ;

    /**
     * 
     * @param entity
     *      e.g. {
     *         "prList": [
     *             {
     *                 "productReference": "5"
     *             },
     *             {
     *                 "productReference": "6"
     *             }
     *         ]
     *     }
     *     
     */
    @POST
    @Path("byproductreferences/")
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    OffersService.PostUnitsByproductreferencesResponse postUnitsByproductreferences(ProductReferenceParamList entity)
        throws Exception
    ;

    /**
     * Reads all Offers belonging to a specific Care Unit
     * 
     * @param unitId
     *     
     */
    @GET
    @Path("byunitid/{unitId}")
    @Produces({
        "application/json"
    })
    OffersService.GetUnitsByunitidByUnitIdResponse getUnitsByunitidByUnitId(
        @PathParam("unitId")
        String unitId)
        throws Exception
    ;

    /**
     * 
     * @param entity
     *      e.g. {
     *         "units": [
     *             {
     *                 "unitId": "SE2321000016-14VK"
     *             },
     *             {
     *                 "unitId": "SE2321000016-3M0N"
     *             }
     *         ]
     *     }
     *     
     */
    @POST
    @Path("byunitids")
    @Consumes("application/json")
    @Produces({
        "application/json"
    })
    OffersService.PostUnitsByunitidsResponse postUnitsByunitids(UnitList entity)
        throws Exception
    ;

    /**
     * Reads all Offers belonging to a specific Care Unit
     * 
     * @param hsaID
     *     
     */
    @GET
    @Path("{hsaID}")
    @Produces({
        "application/json"
    })
    OffersService.GetUnitsByHsaIDResponse getUnitsByHsaID(
        @PathParam("hsaID")
        String hsaID)
        throws Exception
    ;

    /**
     * Delete an offer
     * 
     * @param hsaID
     *     
     */
    @DELETE
    @Path("{hsaID}")
    OffersService.DeleteUnitsByHsaIDResponse deleteUnitsByHsaID(
        @PathParam("hsaID")
        String hsaID)
        throws Exception
    ;

    /**
     * 
     * @param product
     *     The Product name to add.
     * @param hsaID
     *     
     */
    @POST
    @Path("{hsaID}/product/")
    OffersService.PostUnitsByHsaIDProductResponse postUnitsByHsaIDProduct(
        @PathParam("hsaID")
        String hsaID,
        @QueryParam("product")
        String product)
        throws Exception
    ;

    /**
     * 
     * @param product
     *     A comma separated list of product names to set. (RAML doesn't seem to have a way to set this, so it's just a string for now)
     * @param hsaID
     *     
     */
    @POST
    @Path("{hsaID}/products/")
    OffersService.PostUnitsByHsaIDProductsResponse postUnitsByHsaIDProducts(
        @PathParam("hsaID")
        String hsaID,
        @QueryParam("product")
        String product)
        throws Exception
    ;

    /**
     * 
     * @param contract
     *     The Contract UUID to add to the Offer.
     * @param hsaID
     *     
     */
    @POST
    @Path("{hsaID}/contract/")
    OffersService.PostUnitsByHsaIDContractResponse postUnitsByHsaIDContract(
        @PathParam("hsaID")
        String hsaID,
        @QueryParam("contract")
        String contract)
        throws Exception
    ;

    /**
     * 
     * @param contract
     *     A comma seperated list of contract UUID:s to set. (RAML doesn't seem to have a way to set this, so it's just a string for now)
     * @param hsaID
     *     
     */
    @POST
    @Path("{hsaID}/contracts/")
    OffersService.PostUnitsByHsaIDContractsResponse postUnitsByHsaIDContracts(
        @PathParam("hsaID")
        String hsaID,
        @QueryParam("contract")
        String contract)
        throws Exception
    ;

    /**
     * Returns unit id's for units where offer has been updated after the given timestamp.
     * 
     * @param timeStamp
     *     
     */
    @GET
    @Path("updatedafter/{timeStamp}")
    @Produces({
        "application/json"
    })
    OffersService.GetUnitsUpdatedafterByTimeStampResponse getUnitsUpdatedafterByTimeStamp(
        @PathParam("timeStamp")
        String timeStamp)
        throws Exception
    ;

    /**
     * Reads all Offers belonging to care units that have a specific product names ties to them.
     * 
     * @param productName
     *     
     */
    @GET
    @Path("byproductname/{productName}")
    @Produces({
        "application/json"
    })
    OffersService.GetUnitsByproductnameByProductNameResponse getUnitsByproductnameByProductName(
        @PathParam("productName")
        String productName)
        throws Exception
    ;

    public class DeleteUnitsByHsaIDResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private DeleteUnitsByHsaIDResponse(Response delegate) {
            super(delegate);
        }

        /**
         * Offer was deleted successfully (no content in response body)
         * 
         */
        public static OffersService.DeleteUnitsByHsaIDResponse withoutContent() {
            Response.ResponseBuilder responseBuilder = Response.status(204);
            return new OffersService.DeleteUnitsByHsaIDResponse(responseBuilder.build());
        }

    }

    public class GetUnitsByHsaIDResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private GetUnitsByHsaIDResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested capacity information was found and is returned in the body. e.g. {
         *   "hsaID": "SE2321000016-3TNL",
         *   "product": [
         *       {
         *           "capacity": [
         *               {
         *                   "code": "2",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410281000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "4"
         *               },
         *               {
         *                   "code": "1",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410242000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "16"
         *               }
         *           ],
         *           "hsaID": "SE2321000016-1HF3",
         *           "name": "40"
         *       }
         *   ]
         * 
         * 
         * @param entity
         *     {
         *       "hsaID": "SE2321000016-3TNL",
         *       "product": [
         *           {
         *               "capacity": [
         *                   {
         *                       "code": "2",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410281000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "4"
         *                   },
         *                   {
         *                       "code": "1",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410242000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "16"
         *                   }
         *               ],
         *               "hsaID": "SE2321000016-1HF3",
         *               "name": "40"
         *           }
         *       ]
         *     
         */
        public static OffersService.GetUnitsByHsaIDResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.GetUnitsByHsaIDResponse(responseBuilder.build());
        }

    }

    public class GetUnitsByproductnameByProductNameResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private GetUnitsByproductnameByProductNameResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested offer information was found and is returned in the body. e.g. {
         *   "hsaID": "SE2321000016-3TNL",
         *   "product": [
         *       {
         *           "capacity": [
         *               {
         *                   "code": "2",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410281000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "4"
         *               },
         *               {
         *                   "code": "1",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410242000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "16"
         *               }
         *           ],
         *           "hsaID": "SE2321000016-1HF3",
         *           "name": "40"
         *       }
         *   ]
         * 
         * 
         * @param entity
         *     {
         *       "hsaID": "SE2321000016-3TNL",
         *       "product": [
         *           {
         *               "capacity": [
         *                   {
         *                       "code": "2",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410281000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "4"
         *                   },
         *                   {
         *                       "code": "1",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410242000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "16"
         *                   }
         *               ],
         *               "hsaID": "SE2321000016-1HF3",
         *               "name": "40"
         *           }
         *       ]
         *     
         */
        public static OffersService.GetUnitsByproductnameByProductNameResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.GetUnitsByproductnameByProductNameResponse(responseBuilder.build());
        }

    }

    public class GetUnitsByunitidByUnitIdResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private GetUnitsByunitidByUnitIdResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested capacity information was found and is returned in the body. e.g. {
         *   "hsaID": "SE2321000016-3TNL",
         *   "product": [
         *       {
         *           "capacity": [
         *               {
         *                   "code": "2",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410281000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "4"
         *               },
         *               {
         *                   "code": "1",
         *                   "codeSystem": "oid.sll.vantetider",
         *                   "createdByHsaID": "CREATED",
         *                   "creationTime": 1425410242000,
         *                   "product": null,
         *                   "sourceSystemHsaID": "SOURCE",
         *                   "validTo": 1427410800000,
         *                   "value": "16"
         *               }
         *           ],
         *           "hsaID": "SE2321000016-1HF3",
         *           "name": "40"
         *       }
         *   ]
         * 
         * 
         * @param entity
         *     {
         *       "hsaID": "SE2321000016-3TNL",
         *       "product": [
         *           {
         *               "capacity": [
         *                   {
         *                       "code": "2",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410281000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "4"
         *                   },
         *                   {
         *                       "code": "1",
         *                       "codeSystem": "oid.sll.vantetider",
         *                       "createdByHsaID": "CREATED",
         *                       "creationTime": 1425410242000,
         *                       "product": null,
         *                       "sourceSystemHsaID": "SOURCE",
         *                       "validTo": 1427410800000,
         *                       "value": "16"
         *                   }
         *               ],
         *               "hsaID": "SE2321000016-1HF3",
         *               "name": "40"
         *           }
         *       ]
         *     
         */
        public static OffersService.GetUnitsByunitidByUnitIdResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.GetUnitsByunitidByUnitIdResponse(responseBuilder.build());
        }

    }

    public class GetUnitsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private GetUnitsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested offers was found and is returned in the body. e.g. {
         *   "creationTime": 1393305743000,
         *   "productReferences": [
         *     {
         *         "capacities": null,
         *         "comment": null,
         *         "contractedPrice": null,
         *         "contractedProduct": false,
         *         "product": {
         *             "codes": null,
         *             "creationTime": null,
         *             "description": null,
         *             "displayName": null,
         *             "name": "62",
         *             "status": null,
         *             "updateTime": null,
         *             "updatedByHsaid": null
         *         }
         *       },
         *       "regionalUnitId": "SE2321000016-116V",
         *       "relativeDistinguishedName": null,
         *       "unitId": "SE2321000016-116V",
         *       "updateTime": 1393305743000
         *     }
         *   ]
         * }
         * 
         * 
         * @param entity
         *     {
         *       "creationTime": 1393305743000,
         *       "productReferences": [
         *         {
         *             "capacities": null,
         *             "comment": null,
         *             "contractedPrice": null,
         *             "contractedProduct": false,
         *             "product": {
         *                 "codes": null,
         *                 "creationTime": null,
         *                 "description": null,
         *                 "displayName": null,
         *                 "name": "62",
         *                 "status": null,
         *                 "updateTime": null,
         *                 "updatedByHsaid": null
         *             }
         *           },
         *           "regionalUnitId": "SE2321000016-116V",
         *           "relativeDistinguishedName": null,
         *           "unitId": "SE2321000016-116V",
         *           "updateTime": 1393305743000
         *         }
         *       ]
         *     }
         *     
         */
        public static OffersService.GetUnitsResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.GetUnitsResponse(responseBuilder.build());
        }

    }

    public class GetUnitsUpdatedafterByTimeStampResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private GetUnitsUpdatedafterByTimeStampResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested offer information was found and is returned in the body. e.g. {
         *   "units": [
         *     {
         *         "unitId": "SE2321000016-14VK"
         *     },
         *     {
         *         "unitId": "SE2321000016-3M0N"
         *     }
         *   ]
         * }
         * 
         * 
         * @param entity
         *     {
         *       "units": [
         *         {
         *             "unitId": "SE2321000016-14VK"
         *         },
         *         {
         *             "unitId": "SE2321000016-3M0N"
         *         }
         *       ]
         *     }
         *     
         */
        public static OffersService.GetUnitsUpdatedafterByTimeStampResponse jsonOK(UnitList entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.GetUnitsUpdatedafterByTimeStampResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByHsaIDContractResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByHsaIDContractResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Contract was successfully added to the Offer
         * 
         */
        public static OffersService.PostUnitsByHsaIDContractResponse created() {
            Response.ResponseBuilder responseBuilder = Response.status(201);
            return new OffersService.PostUnitsByHsaIDContractResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByHsaIDContractsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByHsaIDContractsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Contracts were successfully added to the Offer
         * 
         */
        public static OffersService.PostUnitsByHsaIDContractsResponse created() {
            Response.ResponseBuilder responseBuilder = Response.status(201);
            return new OffersService.PostUnitsByHsaIDContractsResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByHsaIDProductResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByHsaIDProductResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Offer was successfully created
         * 
         */
        public static OffersService.PostUnitsByHsaIDProductResponse created() {
            Response.ResponseBuilder responseBuilder = Response.status(201);
            return new OffersService.PostUnitsByHsaIDProductResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByHsaIDProductsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByHsaIDProductsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Offer was successfully created
         * 
         */
        public static OffersService.PostUnitsByHsaIDProductsResponse created() {
            Response.ResponseBuilder responseBuilder = Response.status(201);
            return new OffersService.PostUnitsByHsaIDProductsResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByproductreferencesResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByproductreferencesResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Offers information was found and is returned in the body. e.g. {
         *   {
         *     "creationTime": 1393305728000,
         *     "productReferences": [
         *         {
         *             "capacities": null,
         *             "comment": null,
         *             "contractedPrice": null,
         *             "contractedProduct": false,
         *             "product": {
         *                 "codes": null,
         *                 "creationTime": null,
         *                 "description": null,
         *                 "displayName": null,
         *                 "name": "116",
         *                 "status": null,
         *                 "updateTime": null,
         *                 "updatedByHsaid": null
         *             }
         *         }
         *     ],
         *     "regionalUnitId": "SE2321000016-3M0N",
         *     "relativeDistinguishedName": null,
         *     "unitId": "SE2321000016-3M0N",
         *     "updateTime": 1393305728000
         * }
         * 
         * 
         * @param entity
         *     {
         *       {
         *         "creationTime": 1393305728000,
         *         "productReferences": [
         *             {
         *                 "capacities": null,
         *                 "comment": null,
         *                 "contractedPrice": null,
         *                 "contractedProduct": false,
         *                 "product": {
         *                     "codes": null,
         *                     "creationTime": null,
         *                     "description": null,
         *                     "displayName": null,
         *                     "name": "116",
         *                     "status": null,
         *                     "updateTime": null,
         *                     "updatedByHsaid": null
         *                 }
         *             }
         *         ],
         *         "regionalUnitId": "SE2321000016-3M0N",
         *         "relativeDistinguishedName": null,
         *         "unitId": "SE2321000016-3M0N",
         *         "updateTime": 1393305728000
         *     }
         *     
         */
        public static OffersService.PostUnitsByproductreferencesResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.PostUnitsByproductreferencesResponse(responseBuilder.build());
        }

    }

    public class PostUnitsByunitidsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsByunitidsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Offers information was found and is returned in the body. e.g. {
         *   {
         *     "creationTime": 1393305728000,
         *     "productReferences": [
         *         {
         *             "capacities": null,
         *             "comment": null,
         *             "contractedPrice": null,
         *             "contractedProduct": false,
         *             "product": {
         *                 "codes": null,
         *                 "creationTime": null,
         *                 "description": null,
         *                 "displayName": null,
         *                 "name": "116",
         *                 "status": null,
         *                 "updateTime": null,
         *                 "updatedByHsaid": null
         *             }
         *         }
         *     ],
         *     "regionalUnitId": "SE2321000016-3M0N",
         *     "relativeDistinguishedName": null,
         *     "unitId": "SE2321000016-3M0N",
         *     "updateTime": 1393305728000
         * }
         * 
         * 
         * @param entity
         *     {
         *       {
         *         "creationTime": 1393305728000,
         *         "productReferences": [
         *             {
         *                 "capacities": null,
         *                 "comment": null,
         *                 "contractedPrice": null,
         *                 "contractedProduct": false,
         *                 "product": {
         *                     "codes": null,
         *                     "creationTime": null,
         *                     "description": null,
         *                     "displayName": null,
         *                     "name": "116",
         *                     "status": null,
         *                     "updateTime": null,
         *                     "updatedByHsaid": null
         *                 }
         *             }
         *         ],
         *         "regionalUnitId": "SE2321000016-3M0N",
         *         "relativeDistinguishedName": null,
         *         "unitId": "SE2321000016-3M0N",
         *         "updateTime": 1393305728000
         *     }
         *     
         */
        public static OffersService.PostUnitsByunitidsResponse jsonOK(List<OfferUnitList> entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.PostUnitsByunitidsResponse(responseBuilder.build());
        }

    }

    public class PostUnitsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PostUnitsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * The requested Offer was successfully created
         * 
         */
        public static OffersService.PostUnitsResponse created() {
            Response.ResponseBuilder responseBuilder = Response.status(201);
            return new OffersService.PostUnitsResponse(responseBuilder.build());
        }

    }

    public class PutUnitsResponse
        extends se.sll.service.catalogue.offers.api.support.ResponseWrapper
    {


        private PutUnitsResponse(Response delegate) {
            super(delegate);
        }

        /**
         * Update successful. e.g. {
         *   "hsaID" : "SE2321000016-1HF3",
         *   "regionalUnitId" : "126t"
         * }
         * 
         * 
         * @param entity
         *     {
         *       "hsaID" : "SE2321000016-1HF3",
         *       "regionalUnitId" : "126t"
         *     }
         *     
         */
        public static OffersService.PutUnitsResponse jsonOK(CreateOffer entity) {
            Response.ResponseBuilder responseBuilder = Response.status(200).header("Content-Type", "application/json");
            responseBuilder.entity(entity);
            return new OffersService.PutUnitsResponse(responseBuilder.build());
        }

    }

}
